﻿namespace PluginForDNSRecord
{
    /// <summary>
    /// DNS记录修改接口
    /// </summary>
    public interface IDNSRecordEditor
    {
        /// <summary>
        /// 插件唯一标识，将显示为标题
        /// </summary>
        public string Identity { get; }
        /// <summary>
        /// 描述 
        /// </summary>
        public string Description { get;  }

        /// <summary>
        /// 需要主程序提供的配置项
        /// </summary>
        public List<ConfigItem> ConfigKey { get; }
        /// <summary>
        /// 主程序在拿到用户配置项以后
        /// 在调用EditDnsRecord方法前填充Config
        /// 无论用户是否填写过配置项，config中始终都有对应的configkey，为填写的Vaue为空
        /// </summary>
        public Dictionary<string, string> Config { get; set; }
        /// <summary>
        /// 修改DNS记录
        /// </summary>
        /// <returns></returns>
        public Task<EditorResult> EditDnsRecord(string domainName,string recordName,string Type,string recordValue);
    }
}
